﻿<%@ Page Language="C#" MasterPageFile="~/ffl/ffl.master" AutoEventWireup="true" CodeFile="UserAdmin.aspx.cs" Inherits="ffl_admin_UserAdmin" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <form runat="server">
        <asp:Repeater runat="server" ID="UserRepeater" OnItemCommand="UserRepeater_ItemCommand">
            <HeaderTemplate>
                <table width="100%" cellpadding="0" cellspacing="0">
                    <tr>
                        <td>Email</td>
                        <td colspan="2">Name</td>
                        <td>TeamName</td>
                        <td>Password</td>
                        <td align="center">Paid</td>
                        <td align="center">Plrs</td>
                        <td align="center">Dups</td>
                        <td></td>
                    </tr>
            </HeaderTemplate>
            <ItemTemplate>
                <tr>
                    <asp:HiddenField runat="server" ID="UserIdHidden" Value='<%# DataBinder.Eval(Container.DataItem, "Id") %>' />
                    <td><asp:TextBox runat="server" ID="EmailTextBox" Width="120" Text='<%# DataBinder.Eval(Container.DataItem, "Email") %>'></asp:TextBox></td>
                    <td><asp:TextBox runat="server" ID="ForenameTextBox" Width="50" Text='<%# DataBinder.Eval(Container.DataItem, "Forename") %>'></asp:TextBox></td>
                    <td><asp:TextBox runat="server" ID="SurnameTextBox" Width="50" Text='<%# DataBinder.Eval(Container.DataItem, "Surname") %>'></asp:TextBox></td>
                    <td><asp:TextBox runat="server" ID="TeamNameTextBox" Width="100" Text='<%# DataBinder.Eval(Container.DataItem, "TeamName") %>'></asp:TextBox></td>
                    <td><asp:TextBox runat="server" ID="PasswordTextBox" Width="50" Text='<%# DataBinder.Eval(Container.DataItem, "Password") %>'></asp:TextBox></td>
                    <td align="center"><asp:CheckBox runat="server" ID="PaidCheckBox" Checked='<%# DataBinder.Eval(Container.DataItem, "Paid") %>' /></td>
                    <td align="center"><%# GetUserPlayerCount(Convert.ToInt32(DataBinder.Eval(Container.DataItem, "Id"))) %></td>
                    <td align="center"><%# GetUserPlayerDuplicates(Convert.ToInt32(DataBinder.Eval(Container.DataItem, "Id"))) %></td>
                    <td><asp:Button runat="server" ID="UpdateButton" Text="Update" /></td>
                </tr>
            </ItemTemplate>
            <FooterTemplate>
                </table>
            </FooterTemplate>
        </asp:Repeater>
    </form>
</asp:Content>

